#ifndef __modelTextured__HPP__
#define __modelTextured__HPP__
#include <string>
#include "matrix.cpp"
#include "vector.cpp"

using namespace std;

class modelTextured{
	private:
		unsigned int nbPoints,nbTexs,nbNodes;
		Matrix<double> points;
		Matrix<double> texs;
		Matrix<int> nodes;
		Matrix<int> nodesText;
		string fileText;

		Matrix<double> transform;
		Matrix<double> pointsTransform;
		bool transformChanged;
		unsigned int itNode,itPoint,itTex;

	public:
		modelTextured();
		modelTextured(const unsigned int &sizeP,const unsigned int &sizeT,const unsigned int &sizeN,const string &image);
		~modelTextured();
		static modelTextured* importFromFile(string file);
		void print();
		void addMatrix(Matrix<double> &m);
		void applyMatrix();

		vector<double> getNormal();

		int beginNode();
		int nextNode();
		bool hasNextNode();
		
		vector<double> beginPointByNode();
		vector<double> nextPointByNode();
		bool hasNextPointByNode();

		vector<double> beginTexByNode();
		vector<double> nextTexByNode();
		bool hasNextTexByNode();


		vector<double> beginPoint();
		vector<double> nextPoint();
		bool hasNextPoint();

		vector<int> getCentre();
		double getRayon();
};
#endif
